package com.guomao;

public class JavaDemo2 {

    public static void main(String[] args) {

        //int有四个字节
        int x = 1000;

        //byte有一个字节

        byte b = (byte) x;

        System.out.println(b);

        long a = x;

        double d = 10.2;

        double result = a + b + x + d;
        //long有八个字节


        short s = (short) x;

        byte b1 = 1;
        byte b2 = 2;
//         字面值常量类型确定的
//         结果没有超过byte的取值范围
        byte b3 = 1 + 2;
        byte b4 = (byte) (b1 + b2);


        int a1 = 1000;

        int a2 = returnValue();

        String name = "root";
        if (!(name ==null) || "".equals(name)) {
            //转发到登录页面
        }
    }

    public static int returnValue(){
        return 199;
    }
}
